package org.jeecg.modules.workflow.service.acct.listener;

import org.jeecg.modules.workflow.framework.core.event.BpmProcessInstanceResultEvent;
import org.jeecg.modules.workflow.framework.core.event.BpmProcessInstanceResultEventListener;
import org.jeecg.modules.workflow.service.acct.BpmAcctElmtbAssmtService;
import org.jeecg.modules.workflow.service.acct.impl.BpmAcctElmtbAssmtServiceImpl;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author : Wzz
 * @create : 2023-04- 27- 14:43
 * @desc :变更申请 可剔除考核账户申请 的结果的监听器实现类
 */
@Component
public class BpmAcctElmtbAssmtResultListener extends BpmProcessInstanceResultEventListener {

    @Resource
    private BpmAcctElmtbAssmtService acctElmtbAssmtService;

    @Override
    protected String getProcessDefinitionKey() {
        return BpmAcctElmtbAssmtServiceImpl.PROCESS_KEY;
    }

    @Override
    protected void onEvent(BpmProcessInstanceResultEvent event) {
        acctElmtbAssmtService.updateAcctElmtbAssmtResult(event.getBusinessKey(), event.getResult());
    }
}
